<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var obj = {
            name: 'lmx',
            age: 18,
            sex: 1
        }

        for(let key in obj) {
            console.log(key)
        }
        // Uncaught TypeError: obj is not iterable
        // for(let item of obj) {
        //     console.log(item);
        // }

        var arr = [1,3,4,6,9];
        for(let i in arr) {
            console.log(i);
        }
        for(let item of arr) {
            console.log(item);
        }
    </script>
</body>
</html>